//============================================================================
// Name        : TestProject.cpp
// Author      : Game std
// Version     :
// Copyright   : LGPL
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <string.h>
#include <cstddef>
#include <stdio.h>
#include <boost/thread/thread.hpp>
#include "TThreadSafeQueue.h"

TThreadSafeQueue<int*> TestQueue;

int
main()
{
	for ( int i = 0; i < 50; i++ )
	{
		int* Message = new int(i);
		TestQueue.Send( Message );
		fprintf( stderr, "Push message #%u", *Message );

		int* RecivedMessage;
		TestQueue.Receive( &RecivedMessage );
		fprintf( stderr, "Recive message #%u", *RecivedMessage );
		delete RecivedMessage;
	}
	return 0;
}
